package Day06;

public class GoodsTesxt {

    public static void main(String[] args) {

        //创建一个对象数组
        Goods[] arr = new Goods[3];

        //创建三个对象
        Goods g1 = new Goods(001,"美味海参",89,54);
        Goods g2 = new Goods(002,"小鱼干",8,888);
        Goods g3 = new Goods(003,"老干妈",10,888888);


        //将三个对象存到数组当中去
        arr[0] = g1;
        arr[1] = g2;
        arr[2] = g3;

        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i].getId() + "," + arr[i].getName() + "," + arr[i].getPrice());
        }
    }
}
